package top.zhangjianyong.tools.service.mybatis;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import top.zhangjianyong.tools.entity.WaBill;

import java.time.LocalDateTime;
import java.util.List;

public interface IWaBillService extends IService<WaBill> {
    WaBill getByOrderNoAndPlatform(String orderNo, String platform);

    LocalDateTime maxDate(Long userId);

    LocalDateTime minDate(Long userId);

    List<WaBill> listBill(Long userId);

    List<WaBill> listBill(Long userId, LocalDateTime start, LocalDateTime end);

    Page<WaBill> rank(LocalDateTime start, LocalDateTime end, Long userId, String platform, String inOrOut, int page, int size);

    boolean updateStateByOrderNo(String originOrderNo, String state);

    boolean updateState(String platform, String type, String inOrOut,
                        String counterparty, String counterpartyAccount,
                        String commodity, String state);
}
